ModuleInfo "Name: simpeirr: ein einfaches Irrlicht API"
ModuleInfo "Description: ein API fuer die Irrlicht Engine, basierend auf dem Irrlicht-Wrapper von gman"
ModuleInfo "License: Public Domain"
ModuleInfo "Authors: gman, _Jen, Wave (Delta), CoderLaureate (THashtable), Yan (Bit functions), eax for SViewFrustum::classifyBoxRelation(), bruZard (simpleIrr)"
ModuleInfo "CustomAttr: "
import brl.blitz
import irrlicht.core
import irrlicht.addons
CALLBACK_RENDER%=0
CALLBACK_AFTERRENDER%=1
TCallback^brl.blitz.Object{
.callback:Object(irr:TIrrlicht)&
-New%()="_sedm_simpleirr_TCallback_New"
-Delete%()="_sedm_simpleirr_TCallback_Delete"
}="sedm_simpleirr_TCallback"
TRenderCallback^TCallback{
-New%()="_sedm_simpleirr_TRenderCallback_New"
-Delete%()="_sedm_simpleirr_TRenderCallback_Delete"
}="sedm_simpleirr_TRenderCallback"
TAfterRenderCallback^TCallback{
-New%()="_sedm_simpleirr_TAfterRenderCallback_New"
-Delete%()="_sedm_simpleirr_TAfterRenderCallback_Delete"
}="sedm_simpleirr_TAfterRenderCallback"
ENTITY_FX_DEFAULT%=0
ENTITY_FX_FULLBRIGHT%=1
ENTITY_FX_FLATSHADED%=2
ENTITY_FX_DISABLEFOG%=3
ENTITY_FX_DISABLEBACKFACECULLING%=4
TEntity^TIrrlicht{
.pos:irrlicht.core.Vector3df&
.rot:irrlicht.core.Vector3df&
.scl:irrlicht.core.Vector3df&
.node:irrlicht.core.ISceneNode&
.childs:irrlicht.core.ISceneNode&[]&
.selector:irrlicht.core.ITriangleSelector&
.ellipsoid:irrlicht.core.Vector3df&
.ellipsoid_pos:irrlicht.core.Vector3df&
.material:irrlicht.core.SMaterial&
.shaderbuffer:irrlicht.core.ITexture&
.shadermatid%&
-New%()="_sedm_simpleirr_TEntity_New"
-Delete%()="_sedm_simpleirr_TEntity_Delete"
-Position%(x#=0#,y#=0#,z#=0#)="_sedm_simpleirr_TEntity_Position"
-Rotate%(pitch#=0#,yaw#=0#,roll#=0#)="_sedm_simpleirr_TEntity_Rotate"
-Turn%(pitch#=0#,yaw#=0#,roll#=0#)="_sedm_simpleirr_TEntity_Turn"
-Move%(x#=0#,y#=0#,z#=0#)="_sedm_simpleirr_TEntity_Move"
-Translate%(x#=0#,y#=0#,z#=0#)="_sedm_simpleirr_TEntity_Translate"
-Point%(entity:TEntity)="_sedm_simpleirr_TEntity_Point"
-Scale%(x#,y#,z#)="_sedm_simpleirr_TEntity_Scale"
-Color%(red%,green%,blue%)="_sedm_simpleirr_TEntity_Color"
-Alpha%(value#)="_sedm_simpleirr_TEntity_Alpha"
-Shininess%(value#)="_sedm_simpleirr_TEntity_Shininess"
-MaterialType%(typ%=0)="_sedm_simpleirr_TEntity_MaterialType"
-GetMaterial:irrlicht.core.smaterial(num%)="_sedm_simpleirr_TEntity_GetMaterial"
-CountMaterials%()="_sedm_simpleirr_TEntity_CountMaterials"
-SetTexture%(tex:TTexture,index%=0)="_sedm_simpleirr_TEntity_SetTexture"
-Fx%(fx_type%)="_sedm_simpleirr_TEntity_Fx"
-copy:TEntity()="_sedm_simpleirr_TEntity_copy"
-X#(globl%=0)="_sedm_simpleirr_TEntity_X"
-Y#(globl%=0)="_sedm_simpleirr_TEntity_Y"
-Z#(globl%=0)="_sedm_simpleirr_TEntity_Z"
-Pitch#(glob%=0)="_sedm_simpleirr_TEntity_Pitch"
-Yaw#(glob%=0)="_sedm_simpleirr_TEntity_Yaw"
-Roll#(glob%=0)="_sedm_simpleirr_TEntity_Roll"
-Class$()="_sedm_simpleirr_TEntity_Class"
-CountChildren%()="_sedm_simpleirr_TEntity_CountChildren"
-free%()="_sedm_simpleirr_TEntity_free"
-CollideWith%(entity:TEntity)="_sedm_simpleirr_TEntity_CollideWith"
-CollideEllipsoid%(width#,height#,depth#)="_sedm_simpleirr_TEntity_CollideEllipsoid"
-CollideEllipsoidPosition%(x#,y#,z#)="_sedm_simpleirr_TEntity_CollideEllipsoidPosition"
-GetMatrixPointer#*(glob%=1)="_sedm_simpleirr_TEntity_GetMatrixPointer"
}="sedm_simpleirr_TEntity"
PositionEntity%(entity:TEntity,x#=0#,y#=0#,z#=0#)="sedm_simpleirr_PositionEntity"
MoveEntity%(entity:TEntity,x#=0#,y#=0#,z#=0#)="sedm_simpleirr_MoveEntity"
TranslateEntity%(entity:TEntity,x#=0#,y#=0#,z#=0#)="sedm_simpleirr_TranslateEntity"
RotateEntity%(entity:TEntity,pitch#=0#,yaw#=0#,roll#=0#)="sedm_simpleirr_RotateEntity"
TurnEntity%(entity:TEntity,pitch#=0#,yaw#=0#,roll#=0#)="sedm_simpleirr_TurnEntity"
ScaleEntity%(entity:TEntity,x_scale#=1#,y_scale#=1#,z_scale#=1#)="sedm_simpleirr_ScaleEntity"
PointEntity%(entity:TEntity,target:TEntity)="sedm_simpleirr_PointEntity"
EntityColor%(entity:TEntity,red%,green%,blue%)="sedm_simpleirr_EntityColor"
EntityAlpha%(entity:TEntity,alpha#=1#)="sedm_simpleirr_EntityAlpha"
EntityShininess%(entity:TEntity,shininess#=0#)="sedm_simpleirr_EntityShininess"
EntityMatType%(entity:TEntity,typ%=0)="sedm_simpleirr_EntityMatType"
EntityTexture%(entity:TEntity,texture:TTexture,index%=0)="sedm_simpleirr_EntityTexture"
CopyEntity:TEntity(entity:TEntity)="sedm_simpleirr_CopyEntity"
FreeEntity%(entity:TEntity)="sedm_simpleirr_FreeEntity"
EntityX#(entity:TEntity,glob%=0)="sedm_simpleirr_EntityX"
EntityY#(entity:TEntity,glob%=0)="sedm_simpleirr_EntityY"
EntityZ#(entity:TEntity,glob%=0)="sedm_simpleirr_EntityZ"
EntityPitch#(entity:TEntity,glob%=0)="sedm_simpleirr_EntityPitch"
EntityYaw#(entity:TEntity,glob%=0)="sedm_simpleirr_EntityYaw"
EntityRoll#(entity:TEntity,glob%=0)="sedm_simpleirr_EntityRoll"
EntityClass$(entity:TEntity)="sedm_simpleirr_EntityClass"
CAM_PROJ_NONE@=0
CAM_PROJ_PERSPECTIVE@=1
CAM_PROJ_ORTHOGRAPHIC@=2
TCamera^TEntity{
.min_zoom#&
.max_zoom#&
.ortho@&
-New%()="_sedm_simpleirr_TCamera_New"
-Delete%()="_sedm_simpleirr_TCamera_Delete"
+Create:TCamera(parent:TEntity="bbNullObject")="_sedm_simpleirr_TCamera_Create"
+CreateFPS:TCamera(parent:TEntity="bbNullObject")="_sedm_simpleirr_TCamera_CreateFPS"
-SetZoom%(zoom#=1#)="_sedm_simpleirr_TCamera_SetZoom"
-ProjMode%(mode@=1)="_sedm_simpleirr_TCamera_ProjMode"
}="sedm_simpleirr_TCamera"
CreateCamera:TCamera(parent:TEntity="bbNullObject")="sedm_simpleirr_CreateCamera"
CreateFPSCamera:TCamera(parent:TEntity="bbNullObject")="sedm_simpleirr_CreateFPSCamera"
CameraZoom%(cam:TCamera,zoom#=1#)="sedm_simpleirr_CameraZoom"
CameraProjMode%(cam:TCamera,mode@=1)="sedm_simpleirr_CameraProjMode"
LIGHT_POINT%=0
LIGHT_SPOT%=1
LIGHT_DIRECTIONAL%=2
TLight^TEntity{
-New%()="_sedm_simpleirr_TLight_New"
-Delete%()="_sedm_simpleirr_TLight_Delete"
+Create:TLight(typ%=2,parent:TEntity="bbNullObject")="_sedm_simpleirr_TLight_Create"
-SetRange%(range#=1000#)="_sedm_simpleirr_TLight_SetRange"
-Color%(red%,green%,blue%)="_sedm_simpleirr_TLight_Color"
-SpecColor%(red%,green%,blue%)="_sedm_simpleirr_TLight_SpecColor"
-ConeAngles%(innerAngle%=0,outerAngle%=90)="_sedm_simpleirr_TLight_ConeAngles"
-CastShadows%(enable%=1)="_sedm_simpleirr_TLight_CastShadows"
}="sedm_simpleirr_TLight"
CreateLight:TLight(typ%=2,parent:TEntity="bbNullObject")="sedm_simpleirr_CreateLight"
LightRange%(l:TLight,range#=1000#)="sedm_simpleirr_LightRange"
LightColor%(l:TLight,red%,green%,blue%)="sedm_simpleirr_LightColor"
LightSpecColor%(l:TLight,red%,green%,blue%)="sedm_simpleirr_LightSpecColor"
LightConeAngles%(l:TLight,innerAngle%=0,outerAngle%=90)="sedm_simpleirr_LightConeAngles"
LightCastShadows%(l:TLight,enable%=1)="sedm_simpleirr_LightCastShadows"
TMesh^TEntity{
.msh:irrlicht.core.IMesh&
-New%()="_sedm_simpleirr_TMesh_New"
-Delete%()="_sedm_simpleirr_TMesh_Delete"
+LoadMesh:TMesh(filename$,parent:TEntity="bbNullObject")="_sedm_simpleirr_TMesh_LoadMesh"
-CopyMesh:TMesh(parent:TEntity="bbNullObject")="_sedm_simpleirr_TMesh_CopyMesh"
-MeshLighting%(enable@=1)="_sedm_simpleirr_TMesh_MeshLighting"
-getWidth#()="_sedm_simpleirr_TMesh_getWidth"
-getHeight#()="_sedm_simpleirr_TMesh_getHeight"
-getDepth#()="_sedm_simpleirr_TMesh_getDepth"
}="sedm_simpleirr_TMesh"
LoadMesh:TMesh(filename$,parent:TEntity="bbNullObject")="sedm_simpleirr_LoadMesh"
CopyMesh:TMesh(msh:TMesh,parent:TEntity="bbNullObject")="sedm_simpleirr_CopyMesh"
meshWidth#(entity:TEntity)="sedm_simpleirr_meshWidth"
meshHeight#(entity:TEntity)="sedm_simpleirr_meshHeight"
meshDepth#(entity:TEntity)="sedm_simpleirr_meshDepth"
TAnimMesh^TMesh{
.msh:irrlicht.core.IAnimatedMesh&
-New%()="_sedm_simpleirr_TAnimMesh_New"
-Delete%()="_sedm_simpleirr_TAnimMesh_Delete"
+LoadAnimMesh:TAnimMesh(filename$,cast_shadows@=0,parent:TEntity="bbNullObject")="_sedm_simpleirr_TAnimMesh_LoadAnimMesh"
-SetFrameLoop%(first%=0,last%=0)="_sedm_simpleirr_TAnimMesh_SetFrameLoop"
-SetAnimSpeed%(speed#=20#)="_sedm_simpleirr_TAnimMesh_SetAnimSpeed"
-CurrentFrame%()="_sedm_simpleirr_TAnimMesh_CurrentFrame"
-MeshLighting%(enable@=1)="_sedm_simpleirr_TAnimMesh_MeshLighting"
}="sedm_simpleirr_TAnimMesh"
LoadAnimMesh:TAnimMesh(filename$,cast_shadows@=0,parent:TEntity="bbNullObject")="sedm_simpleirr_LoadAnimMesh"
SetAnimSpeed%(animmesh:TAnimMesh,speed#=20#)="sedm_simpleirr_SetAnimSpeed"
SetFrameLoop%(animmesh:TAnimMesh,first%=0,last%=0)="sedm_simpleirr_SetFrameLoop"
GetCurrentFrame%(animmesh:TAnimMesh)="sedm_simpleirr_GetCurrentFrame"
TBSPLevel^TAnimMesh{
.dynamic_lighted@&
-New%()="_sedm_simpleirr_TBSPLevel_New"
-Delete%()="_sedm_simpleirr_TBSPLevel_Delete"
+LoadBSP:TBSPLevel(level_file$,receiveShadows@=0,parent:TEntity="bbNullObject")="_sedm_simpleirr_TBSPLevel_LoadBSP"
-SetLighting%(dynamic_lighting@)="_sedm_simpleirr_TBSPLevel_SetLighting"
}="sedm_simpleirr_TBSPLevel"
LoadBSP:TBSPLevel(level_file$,receiveShadows@=0,parent:TEntity="bbNullObject")="sedm_simpleirr_LoadBSP"
DynamicBSPLighting%(bsp_level:TBSPLevel,enable@)="sedm_simpleirr_DynamicBSPLighting"
TTexture^TEntity{
.filename$&
.tex:irrlicht.core.ITexture&
-New%()="_sedm_simpleirr_TTexture_New"
-Delete%()="_sedm_simpleirr_TTexture_Delete"
+Load:TTexture(filename$)="_sedm_simpleirr_TTexture_Load"
-getTexture:irrlicht.core.ITexture()="_sedm_simpleirr_TTexture_getTexture"
}="sedm_simpleirr_TTexture"
LoadTexture:TTexture(filename$)="sedm_simpleirr_LoadTexture"
TPrimitives^TEntity{
.skybox_tex:irrlicht.core.ITexture&[]&
-New%()="_sedm_simpleirr_TPrimitives_New"
-Delete%()="_sedm_simpleirr_TPrimitives_Delete"
+Cube:TPrimitives(Parent:TEntity="bbNullObject")="_sedm_simpleirr_TPrimitives_Cube"
+Sphere:TPrimitives(polyCount%=16,Parent:TEntity="bbNullObject")="_sedm_simpleirr_TPrimitives_Sphere"
+Skybox:TPrimitives(texture_pak$,Parent:TEntity="bbNullObject")="_sedm_simpleirr_TPrimitives_Skybox"
}="sedm_simpleirr_TPrimitives"
CreateCube:TPrimitives(Parent:TEntity)="sedm_simpleirr_CreateCube"
CreateSphere:TPrimitives(polyCount%=16,Parent:TEntity)="sedm_simpleirr_CreateSphere"
CreateSkyBox:TPrimitives(texture_pak$,Parent:TEntity="bbNullObject")="sedm_simpleirr_CreateSkyBox"
TScene^TEntity{
scenechilds:irrlicht.core.ISceneNode&[]&=mem:p("_sedm_simpleirr_TScene_scenechilds")
-New%()="_sedm_simpleirr_TScene_New"
-Delete%()="_sedm_simpleirr_TScene_Delete"
+Load:TScene(scenefile$)="_sedm_simpleirr_TScene_Load"
-getChilds%()="_sedm_simpleirr_TScene_getChilds"
+FindByName:irrlicht.core.ISceneNode(nodename$)="_sedm_simpleirr_TScene_FindByName"
+FindEntityByName:TEntity(EntityName$)="_sedm_simpleirr_TScene_FindEntityByName"
}="sedm_simpleirr_TScene"
LoadIrrScene:TScene(scenefile$)="sedm_simpleirr_LoadIrrScene"
findEntity:TEntity(EntityName$)="sedm_simpleirr_findEntity"
TMeshBuffer^brl.blitz.Object{
_list:brl.linkedlist.TList&=mem:p("_sedm_simpleirr_TMeshBuffer__list")
.buffer:irrlicht.core.IMeshBuffer&
-New%()="_sedm_simpleirr_TMeshBuffer_New"
-Delete%()="_sedm_simpleirr_TMeshBuffer_Delete"
}="sedm_simpleirr_TMeshBuffer"
TSurface^TEntity{
.meshbuffer:TMeshBuffer&
-New%()="_sedm_simpleirr_TSurface_New"
-Delete%()="_sedm_simpleirr_TSurface_Delete"
}="sedm_simpleirr_TSurface"
TIrrlicht^brl.blitz.Object{
irr_device:irrlicht.core.IrrlichtDevice&=mem:p("_sedm_simpleirr_TIrrlicht_irr_device")
irr_video:irrlicht.core.IVideoDriver&=mem:p("_sedm_simpleirr_TIrrlicht_irr_video")
irr_scene:irrlicht.core.ISceneManager&=mem:p("_sedm_simpleirr_TIrrlicht_irr_scene")
irr_events:irrlicht.addons.SmoothEventReceiver&=mem:p("_sedm_simpleirr_TIrrlicht_irr_events")
irr_gui:irrlicht.core.IGUIEnvironment&=mem:p("_sedm_simpleirr_TIrrlicht_irr_gui")
irr_gpu:irrlicht.core.IGPUProgrammingServices&=mem:p("_sedm_simpleirr_TIrrlicht_irr_gpu")
.tmp_dev:irrlicht.core.IrrlichtDevice&
.renderer%&
.shadows@&
.fullscreen@&
.vsync@&
.screensize:irrlicht.core.Dimension2di&
.backbuffer@&
.zbuffer@&
.vml:irrlicht.core.IVideoModeList&
.screencolor:irrlicht.core.SColor&
.gravity:irrlicht.core.Vector3df&
.fogcolor:irrlicht.core.SColor&
.useshaders%&
.vs_model%&
.ps_model%&
.vertices:irrlicht.core.Array_S3DVertex&
.indices:irrlicht.core.Array_u16&
.callbacks:brl.linkedlist.TList&
-New%()="_sedm_simpleirr_TIrrlicht_New"
-Delete%()="_sedm_simpleirr_TIrrlicht_Delete"
+Init:TIrrlicht(renderDevice%=5,shadows@=1,shadersupport@=1)="_sedm_simpleirr_TIrrlicht_Init"
-ActivateShaders%(Enable%=1,vertexshadermodel%=0,pixelshadermodel%=3)="_sedm_simpleirr_TIrrlicht_ActivateShaders"
-Graphics3D%(width%,height%,depth%=16,fullscreen@=0,vsync@=0)="_sedm_simpleirr_TIrrlicht_Graphics3D"
-RenderWorld%()="_sedm_simpleirr_TIrrlicht_RenderWorld"
-ClsColor%(red%,green%,blue%)="_sedm_simpleirr_TIrrlicht_ClsColor"
-ShadowColor%(Alpha%=255,RED%=0,Green%=0,Blue%=0)="_sedm_simpleirr_TIrrlicht_ShadowColor"
-AmbientLight%(red%,green%,blue%)="_sedm_simpleirr_TIrrlicht_AmbientLight"
-SetFog%(enable@=1)="_sedm_simpleirr_TIrrlicht_SetFog"
-getFPS%()="_sedm_simpleirr_TIrrlicht_getFPS"
-isKeyDown@(keycode%)="_sedm_simpleirr_TIrrlicht_isKeyDown"
-isKeyHit@(keycode%)="_sedm_simpleirr_TIrrlicht_isKeyHit"
-dropIrrlicht%()="_sedm_simpleirr_TIrrlicht_dropIrrlicht"
-AddZip%(zip_archive$)="_sedm_simpleirr_TIrrlicht_AddZip"
-AddCallback%(callback:Object(irr:TIrrlicht),callback_type%)="_sedm_simpleirr_TIrrlicht_AddCallback"
-CountGfxModes3D%()="_sedm_simpleirr_TIrrlicht_CountGfxModes3D"
-GfxModeWidth%(mode_id%)="_sedm_simpleirr_TIrrlicht_GfxModeWidth"
-GfxModeHeight%(mode_id%)="_sedm_simpleirr_TIrrlicht_GfxModeHeight"
-GfxModeDepth%(mode_id%)="_sedm_simpleirr_TIrrlicht_GfxModeDepth"
}="sedm_simpleirr_TIrrlicht"
InitIrrlicht:TIrrlicht(renderDevice%=5,useShadows@=1)="sedm_simpleirr_InitIrrlicht"
Graphics3D%(width%=800,height%=600,depth%=16,fullscreen@=0,vsync@=0)="sedm_simpleirr_Graphics3D"
RenderWorld%()="sedm_simpleirr_RenderWorld"
dropIrrlicht%()="sedm_simpleirr_dropIrrlicht"
isKeyDown@(keycode%)="sedm_simpleirr_isKeyDown"
ClsColor%(red%,green%,blue%)="sedm_simpleirr_ClsColor"
SetShadowColor%(a%=255,r%=0,g%=0,b%=0)="sedm_simpleirr_SetShadowColor"
AmbientLight%(red%,green%,blue%)="sedm_simpleirr_AmbientLight"
getFPS%()="sedm_simpleirr_getFPS"
SetFog%(enable@=1)="sedm_simpleirr_SetFog"
AddZip%(zip_archive$)="sedm_simpleirr_AddZip"
CountGfxModes3D%()="sedm_simpleirr_CountGfxModes3D"
GfxModeWidth%(mode_id%)="sedm_simpleirr_GfxModeWidth"
GfxModeHeight%(mode_id%)="sedm_simpleirr_GfxModeHeight"
GfxModeDepth%(mode_id%)="sedm_simpleirr_GfxModeDepth"
File2String$(file$)="sedm_simpleirr_File2String"
simpleirr:TIrrlicht&=mem:p("sedm_simpleirr_simpleirr")
